{include file='../Public/header.html'}
{literal}
<script>
	//定义页面载入事件
    $(function(){
        //获取btnAdd按钮
        $('#btnRecycle').bind('click',function(){
            // 设置“添加文章”链接
            window.location.href = 'index.php?p=Back&c=Comment&a=recycle';
        });
    });
</script>
{/literal}
<div class="admin">
	<form action="index.php?p=Back&c=Comment&a=delAll" method="POST">
    <div class="panel admin-panel">
    	<div class="panel-head"><strong>文章列表</strong></div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="checkall" checkfor="id[]" value="全选" />
            <input type="submit" class="button button-small border-yellow"  value="批量删除" onclick="return confirm('确定要删除吗?');"/>
            <input type="button" id="btnRecycle" class="button button-small border-blue" value="回收站" />
        </div>
        <table class="table table-hover">
        	<tr>
                <th width="45">选择</th>
                <th width="120">所属文章</th>
                <th width="200">评论内容</th>
                <th width="180">评论时间</th>
                <th width="100">操作</th>
            </tr>
            {foreach from=$cmtInfo item='row'}
            <tr>
                <td><input type="checkbox" name="cmt_id[]" value="{$row.cmt_id}" /></td>
                <td>{$row.title}</td>
                <td>{$row.cmt_content}</td>
                <td>{$row.cmt_time|date_format:'%Y-%m-%d %H:%M:%S'}</td>
                <td>
                    <a class="button border-blue button-little" href="index.php?p=Back&c=Comment&a=edit&cmt_id={$row.cmt_id}">修改</a> 
                    <a class="button border-yellow button-little" href="index.php?p=Back&c=Comment&a=del&cmt_id={$row.cmt_id}" onclick="return confirm('确定要删除吗?');" >删除</a>
                </td>
            </tr>
            {/foreach}
        </table>
		<div class="panel-foot text-center">
          {$strpage}
        </div>
    </div>
    </form>
    <br />
    <p class="text-right text-gray" style="float:right">基于<a class="text-gray" target="_blank" href="#">MVC框架</a>构建</p>
</div>
</body>
</html>